package com.ny.zmb.glxt.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


@TableName("pm_store_ext")
@ApiModel(value = "PmStoreExt对象", description = "店铺扩展表")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PmStoreExt implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 店铺ID
     */
    private Integer storeId;
    /**
     * 用户ID
     */
    private Integer userId;
    /**
     * 营业执照
     */
    private String businessPicUrl;
    /**
     * 结算卡
     */
    private String accountCardPicFrontUrl;
    /**
     * 法人证据正面
     */
    private String lawyerIdPicFrontUrl;
    /**
     * 法人证件反面图片URL
     */
    private String lawyerIdPicBackUrl;
    /**
     * 法人手持证件正面图片URL
     */
    private String lawyerIdHandFrontUrl;
    /**
     * 门头照图片URL
     */
    private String doorFrontPicUrl;
    /**
     * 收银台
     */
    private String cashierPicUrl;
    /**
     * 场景照
     */
    private String scenePicUrl;
    /**
     * LOGOURL
     */
    private String logo;
    /**
     * 轮播图URL
     */
    private String banner;
    /**
     * 电子协议签名URL
     */
    private String electronicProtocolSignature;
    /**
     * 对赌协议签名URL
     */
    private String signatureOfBettingAgreement;
    /**
     * 担保协议签名URL
     */
    private String signatureOfGuaranteeAgreement;

    public PmStoreExt(Integer userId) {
        this.userId = userId;
    }

    public void setNullToEmpty() {
        if (businessPicUrl == null) {
            this.businessPicUrl = "";
        }
        if (accountCardPicFrontUrl == null) {
            this.accountCardPicFrontUrl = "";
        }
        if (lawyerIdPicFrontUrl == null) {
            this.lawyerIdPicFrontUrl = "";
        }
        if (lawyerIdPicBackUrl == null) {
            this.lawyerIdPicBackUrl = "";
        }
        if (lawyerIdHandFrontUrl == null) {
            this.lawyerIdHandFrontUrl = "";
        }
        if (doorFrontPicUrl == null) {
            this.doorFrontPicUrl = "";
        }
        if (cashierPicUrl == null) {
            this.cashierPicUrl = "";
        }
        if (scenePicUrl == null) {
            this.scenePicUrl = "";
        }
        if (logo == null) {
            this.logo = "";
        }
        if (banner == null) {
            this.banner = "";
        }
        if (electronicProtocolSignature == null) {
            this.electronicProtocolSignature = "";
        }
        if (signatureOfBettingAgreement == null) {
            this.signatureOfBettingAgreement = "";
        }
        if (signatureOfGuaranteeAgreement == null) {
            this.signatureOfGuaranteeAgreement = "";
        }
    }
}
